#include "I_Event.h"
#include "I_Thread.h"

void
Event::schedule_every(ink_hrtime t, int acallback_event)
{
	callback_event = acallback_event;
	timeout_at = period = t;
	mutex = continuation->mutex;
	ethread->notifyQueue.enqueue_local(this);
}

void
Event::schedule_at(ink_hrtime t, int acallback_event)     
{   
	callback_event = acallback_event;
	timeout_at = t;
	period = 0;
	mutex = continuation->mutex;
	ethread->notifyQueue.enqueue_local(this);
}


void
Event::schedule_imm(int acallback_event)
{   
	callback_event = acallback_event;
	timeout_at = period = 0;
	immediate = true;
	mutex = continuation->mutex;
	ethread->notifyQueue.enqueue_local(this);
}

